package com.mocchira.music.radio;

import com.google.ads.AdRequest;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class HotArtistActivity extends TabActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.hot);

        TabHost tabHost = getTabHost();  // The activity TabHost
        TabHost.TabSpec spec;  // Resusable TabSpec for each tab
        Intent intent;  // Reusable Intent for each tab
        Bundle bundle;

        // Create an Intent to launch an Activity for the tab (to be reused)
        intent = new Intent().setClass(this, PlayListActivity.class);
        bundle = new Bundle();
        bundle.putString(R.string.bundle_artist+"", PlayListActivity.CATEGORY.A_I.name());
        intent.putExtras(bundle);

        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("a_i").setIndicator("A to I")
                      .setContent(intent);
        tabHost.addTab(spec);

        // Do the same for the other tabs
        intent = new Intent().setClass(this, PlayListActivity.class);
        bundle = new Bundle();
        bundle.putString(R.string.bundle_artist+"", PlayListActivity.CATEGORY.J_R.name());
        intent.putExtras(bundle);
        spec = tabHost.newTabSpec("j_r").setIndicator("J to R")
                      .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, PlayListActivity.class);
        bundle = new Bundle();
        bundle.putString(R.string.bundle_artist+"", PlayListActivity.CATEGORY.S_Z.name());
        intent.putExtras(bundle);
        spec = tabHost.newTabSpec("s_z").setIndicator("S to Z")
                      .setContent(intent);
        tabHost.addTab(spec);
        
        intent = new Intent().setClass(this, PlayListActivity.class);
        bundle = new Bundle();
        bundle.putString(R.string.bundle_artist+"", PlayListActivity.CATEGORY.OTHERS.name());
        intent.putExtras(bundle);
        spec = tabHost.newTabSpec("others").setIndicator("Others")
                      .setContent(intent);
        tabHost.addTab(spec);

        tabHost.setCurrentTab(0);
        
        //AdRequest request = new AdRequest();
        //request.addTestDevice(AdRequest.TEST_EMULATOR);
        
    }

}
